package com.tarena.demo.luban.all.main.rpc;

import com.tarena.demo.luban.all.main.service.CartService;
import com.tarena.demo.luban.cart.api.CartApi;
import com.tarena.demo.luban.protocol.cart.param.CartDeleteParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
//容器bean对象的id
//驼峰命名 CartApiImpl  id=cartApiImpl
//连续大写 NBAApiImpl   id=NBAApiImpl
@Component
public class CartApiImpl implements CartApi {
    @Autowired
    private CartService cartService;
    @Override
    public Boolean deleteCart(CartDeleteParam cartDeleteParam) {
        System.out.println("通过RPC远程调用删除购物车");
        cartService.deleteCart(cartDeleteParam);
        return true;
    }
}
